<%@ page contentType="text/html;charset=UTF-8" %>
<%@include file="../common/sessionValidate.jsp" %>

<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML>
<html lang="UTF-8">
<head>
    <title>个人信息页</title>
    <%@ include file="../common/meta.jsp" %>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="X-UA-Compatible" content="IE=9">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
    <link rel="stylesheet" href="<%=basePath%>css/my-bootstrap.css" media="screen" id="tuserskin">
    <link rel="stylesheet" href="<%=basePath%>js/toastr/toastr.css">
    <link rel="stylesheet" href="<%=basePath%>css/bootstrapValidator.min.css">
    <script type="text/javascript" src="<%= basePath %>js/jquery.cookie.js"></script>
</head>
<style>
    hr {
        margin-top: 1px;
        border-bottom: 1px solid #1BBC9B;
    }
</style>
<body>
<form class="form-horizontal form-bordered form-row-strippe" name="ffAdd" id="ffAdd" mentod="post" role="form"
      data-toggle="validator" enctype="multipart/form-data">
    <div class="" style="margin-right:2px;padding-right:1px;">

        <!-------------------------- 面板  start--------------------------------->
        <div class="panel panel-primary">
            <div class="panel-heading clearfix" id="addHeaderDiv">
                查看个人详细信息
            </div>
            <div class="panel-body">
                <div class="row">
                    <h5>&nbsp;&nbsp;基本信息</h5>
                    <hr>
                    <div class="col-md-6"><!--start 换列-->
                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="control-label col-md-3">用户id</label>
                                <div class="col-md-9">
                                    <input id="id" name="id" type="text" class="form-control" placeholder="id"
                                           readonly="true"/>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="control-label col-md-3">登录账号</label>
                                <div class="col-md-9">
                                    <input id="userid" name="userid" type="text" class="form-control"
                                           placeholder="userid"/>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="control-label col-md-3">密码</label>
                                <div class="col-md-9">
                                    <input id="password" name="password" type="password" class="form-control"
                                           placeholder="password"/>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="control-label col-md-3">用户名</label>
                                <div class="col-md-9">
                                    <input id="username" name="username" type="text" class="form-control"
                                           placeholder="username"/>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="control-label col-md-3">状态</label>
                                <div class="col-md-9">
                                    <select class="form-control" id="status" name="status">
                                        <option value='1'>有效</option>
                                        <option value='0'>无效</option>
                                        <option value='2'>冻结</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="control-label col-md-3">年假总小时数（8小时=1天）</label>
                                <div class="col-md-9">
                                    <input id="termid" name="termid" type="text" class="form-control"
                                           placeholder=""/>
                                </div>
                            </div>
                        </div>
                        <!--如果输入元素是偶数个元素，在n=size/2?int时输出2列格式；如果元素是奇数个，需要在n=size/2?int时输出2列格式；需要换列，每行最多显示2列-->
                    </div><!--end 换列--><!--start 换列-->
                    <div class="col-md-6">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="control-label col-md-3">地址</label>
                                <div class="col-md-9">
                                    <input id="address" name="address" type="text" class="form-control"
                                           placeholder="address"/>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="control-label col-md-3">固定电话</label>
                                <div class="col-md-9">
                                    <input id="tel" name="tel" type="text" class="form-control" placeholder="tel"/>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="control-label col-md-3">手机</label>
                                <div class="col-md-9">
                                    <input id="phone" name="phone" type="text" class="form-control"
                                           placeholder="phone"/>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="control-label col-md-3">部门</label>
                                <div class="col-md-9">
                                    <input id="branchid" name="branchid" type="text" class="form-control"
                                           placeholder="phone"/>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="control-label col-md-3">管理者</label>
                                <div class="col-md-9">
                                    <select id="ismanager" name="ismanager" class="form-control">
                                        <option value="0" selected>否</option>
                                        <option value="1">是</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="control-label col-md-3">年假已经使用小时数</label>
                                <div class="col-md-9">
                                    <input id="deptid" name="deptid" type="text" class="form-control"
                                           placeholder=""/>
                                </div>
                            </div>
                        </div>
                    </div><!--end 换列-->
                </div><!--end row-->
            </div><!--end body-->

            <div class="modal-footer bg-info " id='buttonDiv'>
                <button type="button" class="btn btn-sm btn-danger" data-dismiss="modal" onclick="history.go(-1)">返回
                </button>
            </div>
        </div>
        <!--------------------------面板 end------------------------------------>

    </div>
</form>
</body>
</html>

<script src="<%=basePath%>js/bootstrap.min.js"></script>
<!--<script type="text/javascript" src="js/bootstrapValidator.js"></script>-->
<script src="<%=basePath%>js/bootstrap-paginator.min.js"></script>
<script src="<%=basePath%>/js/respond.js"></script>
<script src="<%=basePath%>/js/html5.js"></script>
<script src="<%=basePath%>js/toastr/toastr.js"></script>
<script src="<%=basePath%>js/bootbox.js"></script>
<script src="<%=basePath%>js/jquery.validate.js"></script>
<!-- <script src="<%=basePath%>js/additional-methods.min.js"></script> -->
<script src="<%=basePath%>js/my-jquery-curd.js"></script>
<script src="<%= basePath %>js/tableSortTool.js"></script>
<script src="<%= basePath %>js/calendar.js"></script>
<script type="text/javascript">
    //初始化页面及校验
    $().ready(function () {
        //1、初始化管理员显示数据
        var id = '${FREE_CURRENT_USER_OBJ.id}';
        var branchid = '${FREE_CURRENT_USER_OBJ.branchid}';
        var basePath = '<%=basePath%>images/ht/icon_chakan.png';//设置addHeaderDiv标题文字及按钮
        setButtonDivView2();//设置adddiv的 操作按钮
        var url = "<%=basePath%>t_user/getT_user?id=" + id + "&time=" + Math.random();
        $.getJSON(url, function (data) {//获取数据，并且自动填充form，自动代码待修改； @todo;
            setValue(data);
        });
        formReadOnly('ffAdd');//设置表单不可修改
    });
</script>